﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MethodWorx.Core.DomainModel;

namespace MethodWorx.CMS.Content
{
    public class ContentTemplate : AggregateRoot
    {
        public string Name { get; set; }
        public string Description { get; set; }
        public bool Deleted { get; set; }

         public ContentTemplate() 
            : this((ct) => new Property [] { })
        {
        }

         public ContentTemplate(
            Func<ContentTemplate, IEnumerable<Property>> properties)
        {
            if (properties == null)
                throw new ArgumentNullException("properties");

            this.Properties = 
                new ContentTemplatePropertyCollection(this, properties);
        }

         public ContentTemplatePropertyCollection Properties { get; private set; }
    }
}
